package com.ftg.learn.chapter12.manytomany;

import lombok.Data;

/**
 * @author kangjx
 * @createTime 2022/8/2
 */
@Data
public class BikeTable {

    private int index = 0;

    public BikeTable(int bikeCapacity){
        //容错
        bikes = new Bike[bikeCapacity];
    }

    private Bike[] bikes;

    public void add(Bike b){
        //扩容

        this.bikes[index++] =b;
    }

    public Bike get(int index){
        return this.bikes[index];
    }

}
